cmake_minimum_required (VERSION 2.6)
project (shader)
SET(CMAKE_CXX_FLAGS "-std=c++0x -O2 -fbounds-check -mtune=core2 -march=core2")
include_directories("${PROJECT_BINARY_DIR}", "../meshlib" , "/home/sunny/Workspace/OpenNL3.2.1/src")
link_directories ("/home/sunny/Workspace/OpenNL3.2.1/build/binaries/lib")
#SET(CMAKE_INCLUDE_PATH "../meshlib /home/sunny/Workspace/OpenNL3.2.1/src")

Find_Package ( SDL REQUIRED )
Find_Package ( SDL_image REQUIRED ) # if using SDL_image

# Workaround for the non-working REQUIRED flag
if ( NOT SDL_FOUND )
   message ( FATAL_ERROR "SDL not found!" )
endif ( NOT SDL_FOUND )


add_executable(shader shader_main.cpp shader.h shader.cpp gcmesh.h)  
add_executable(main main.cpp shader.h shader.cpp gcmesh.h controls.h glview.h)
target_link_libraries (shader GLEW glut GLU)
target_link_libraries (main GLEW glut GLU SDL SDLmain nl)
